import {Component,Input} from '@angular/core';
import {NavController} from 'ionic-angular';
import {ProductDetailPage} from '../../pages/product-detail/product-detail';

@Component({
  selector: 'g-product-item',
  templateUrl: 'g-product-item.html'
})
export class GProductItemComponent {
  @Input() detail: any

  constructor(
    private nav: NavController
  ) {

  }

  gotoDetail() {
    this.nav.push(ProductDetailPage,{
      id: this.detail.id
    })
  }

}
